<form name="editrole" method="post" action="" enctype="multipart/form-data">
	<p id ="title">General:</p>
	<table border="0" cellpadding="0" cellspacing="0" id="id-form">

		<tr>
			<th valign="top">PRIVILEGE</th>
			<td><input type="text" name="rolename" value="{priv_val}" class="inp-form2" disabled="disabled" /></td>			
		</tr>
		
		</br>
		
		{tables}
		
		<tr>
			<th valign="top">GRANT TO ROLE</th>
			<td><select name="granttorole" class="styledselect_form_3" value="All">
			<option value=""></option>
			{userOrRole}
			</select>
			</td>
		</tr>
		<tr>
			<th valign="top">GRANT TO USER</th>
			<td><select name="granttouser" class="styledselect_form_3" value="All">
			<option value=""></option>
			<option value="PUBLIC">PUBLIC</option>
			{alluser}
			</select>
			<input type="checkbox" name="adoption" value="1" />WITH ADMIN OPTION<br />
			</td>
		</tr>
		<tr>

			<th valign="top">REVOKE FROM USER OR ROLE</th>
			<td><select name="revokeuser" class="styledselect_form_3" value="All">
			<option value=""></option>
			{grantee}
			</select>
			</td>
		</tr>
		</table>
		<table border="0" cellpadding="0" cellspacing="0" id="id-form">		
		<tr>
			</br>
			<th>&nbsp;</th>

			<td valign="top">

				<input name ="submit" type="submit" value="" class="form-submit" />

				<input name ="reset" type="reset" value="" class="form-reset"  />

			</td>

			<td></td>

		</tr>
		</table>
		</br>
		</br>
		
</form>

<script>
	$(document).ready(function(){
		$(".error-inner").each(function(){
			if($(this).html() == '') {
				$(this).css("visibility", "hidden");
				$(this).siblings(".error-left").css("visibility", "hidden");
			}
		});
	});
	
	$(document).ready(function(){
		
	 	$('form[name="editrole"]').validate({
	    	rules: {
	    		table_name: { required: true},				
			},
			errorPlacement: function(error, element){
				$(element).parents('td').next().children(".error-inner").html(error);
										        
		        				
			},
			highlight: function(element, errorClass) {				
				$(element).parents('td').next().children(".error-left, .error-inner").css("visibility", "visible");
				
			},
			unhighlight: function(element, errorClass) {
				$(element).parent('td').next().children(".error-left, .error-inner").css("visibility", "hidden");
				
			}
		    
		});
	});
	
</script>